#!/usr/bin/python3

# SPDX-FileCopyrightText: Red Hat, Inc.
# SPDX-License-Identifier: GPL-2.0-or-later
from __future__ import absolute_import

import io
import argparse

parser = argparse.ArgumentParser()

parser.add_argument('-a', '--add', action='append', dest='paths',
                    help='Add disk image file')
parser.add_argument('--hostname',
                    help='Set new hostname')
parser.add_argument('--selinux-relabel',
                    help='Fix SELinux labels in guest', action='store_true')
parser.add_argument('-v', '--verbose', action='store_true',
                    help='Enable verbose messages for debugging')
parser.add_argument('-x', action='store_true',
                    help='Enable tracing of libguestfs API calls')

options = parser.parse_args()

for path in options.paths:
    with io.open(path, 'r+') as imagefile:
        imagefile.write(u'fake-virt-sysprep was here')
